/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package testdb;

import db.DbUtil;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Hashtable;
import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author tinhtinh
 */
public class TestDB {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        try {
            // TODO code application logic here
            testDB();
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(TestDB.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public static void testDB() throws ClassNotFoundException {
        DbUtil util = new DbUtil();
        try {
            util.connect("localhost:3306", "papermonter_db", "root", "");
            util.ExecuteSP("call myPro(?,?)");
//            util.StartTransaction(Connection.TRANSACTION_SERIALIZABLE);
//            util.CommitTransaction();
        } catch (SQLException ex) {
            Logger.getLogger(TestDB.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
